﻿using System;
using System.Collections.Generic;
using System.Collections;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class pim_PersonalList : System.Web.UI.Page
{
    public ArrayList employementarr = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] == null) { Response.Redirect("../Index.aspx"); }
        int compid = 1;
      
        if (!tb_search.Text.Equals(""))
        {
            string temp = tb_search.Text.ToUpper();
            employementarr = (ArrayList)DB.getEmployementArr("  (upper(tbl_persona.tper_nombre) like '%"+temp+"%' or upper(tbl_persona.tper_nombre2) like '%"+temp+"%' or upper(tbl_persona.tper_apellido) like '%"+temp+"%' or upper(tbl_persona.tper_apellido2) like '%"+temp+"%' ) ");

            //tb_search.Text = "Buscando....";
        }
        else {
            employementarr = (ArrayList)DB.getEmployementArr("");
        
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("PersonalInfo.aspx");
    }
    protected void lnk_all_Click(object sender, EventArgs e)
    {
        employementarr = (ArrayList)DB.getEmployementArr("");
        
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        employementarr = (ArrayList)DB.getEmployementArr("");
    }
}